import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

// 测试 api.test
// 正式 rticle.api

const url = new Vuex.Store({
	state: {
		url: {

			upload: "https://bpapi.jinghushi.com/order.php/util/upload",
			uploadvod: "https://bpapi.jinghushi.com/order.php/util/uploadvod",
			advuploadvod: "https://bpapi.jinghushi.com/saleadv.php/adv/uploadvod",
			advupload: "https://bpapi.jinghushi.com/saleadv.php/adv/upload",
			goodsupload: "https://bpapi.jinghushi.com/saleadv.php/goods/upload"

		},
		Edition: "", //所在端
		Location: {
			x: '',
			y: ''
		},
	},
	mutations: {
		addurl(state, info) {
			// 变更状态
			state.url = info
		},
		addEdition(state, info) {
			// 变更状态
			state.Edition = info
		},
		upLocation(state, info) {
			console.log(info);
			// 变更状态
			state.Location = info
		}
	}
})

export default url